package com.dingding.order.core.history.sql;

/**
 * 
 * @ClassName: HistoryOrderSQL 
 * @Description: 历史订单SQL类
 * @author YHQ
 * @date 2016年8月31日 上午11:01:35
 * @since V2.4.0
 * 
 */
public class HistoryOrderSQL {

	/**
	 * 专车接乘里程
	 * 
	 * @author YHQ
	 */
	public static final String TAKE_MILEAGE = "SELECT SUM(u.distance) AS pickUpMeters FROM userspecialorder u WHERE u.grabOrderUserId = ? AND u.orderStatus = 5";
	

	/**
	 * 出租车接乘里程
	 * 
	 * @author YHQ
	 */
	public static final String TAKE_TAXI_MILEAGE = "SELECT SUM(u.distance) AS pickUpMeters FROM userorder u WHERE u.grabOrderUserId = ? AND u.orderStatus = 4";
	
	
	/**
	 * 获取乘客的接乘里程和搭乘里程
	 * 
	 * @author YHQ
	 */
	public static final String GET_MILEAGES = "SELECT ud.totalWeldingProcess,ud.totalTake FROM userdetail ud WHERE ud.loginId= ?";
	
}
